#ifndef _VALIDATORCONTEXT_H_
#define _VALIDATORCONTEXT_H_
#include "ValidatorBase.h"
#include "MgrBase.h"
#include "CombatDef.h"
class VContext_TurnNum:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext) const ;
	void InitData(int32 iTurnNum,ECompare eCompare)
	{
		m_iTurnNum=iTurnNum;
		m_eCompare=eCompare;
	}

private:
	int32 m_iTurnNum;
	ECompare m_eCompare;
};

class VContext_FieldCardNum:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext)const ;
	void InitData(bool bOurSide,ECardStorage iFieldType,const std::vector<int32>&  rRaces,const std::vector<int32>&  rTypes,int32 iCompNum,ECompare eCompare)
	{
		m_bOurSide=bOurSide;
		m_eFieldType=iFieldType;
		m_vCardRaces=rRaces;
		m_vCardTypes=rTypes;
		m_iCompNum=iCompNum;
		m_eCompare=eCompare;
	}
private:
	bool  m_bOurSide;
	ECardStorage m_eFieldType;
	std::vector<int32>  m_vCardRaces;
	std::vector<int32>  m_vCardTypes;
	int32  m_iCompNum;
	ECompare m_eCompare;
};
class VContext_Compose:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext)const ;
	void InitData(ELogicOpt eLogicOpt,TContextValidatorPtr pV1,TContextValidatorPtr pV2)
	{
		m_eLogicOpt=eLogicOpt;
		m_pV1=pV1;
		m_pV2=pV2;
	}
private:
	TContextValidatorPtr m_pV1;
	TContextValidatorPtr m_pV2;
	ELogicOpt m_eLogicOpt;
};

class VContext_HeroHp:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext)const ;
	void InitData(bool bOurSide,double fHeroHpPercent,ECompare eCompare)
	{
		m_bOurSide=bOurSide;
		m_fHeroHpPercent=fHeroHpPercent;
		m_eCompare=eCompare;
	}
private:
	bool  m_bOurSide;
	double m_fHeroHpPercent;
	ECompare m_eCompare;
};
class VContext_HeroSP:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext)const ;
	void InitData(bool bOurSide,int32 iSpValue,ECompare eCompare)
	{
		m_bOurSide=bOurSide;
		m_iSpValue=iSpValue;
		m_eCompare=eCompare;
	}
private:
	bool  m_bOurSide;
	int32  m_iSpValue;
	ECompare m_eCompare;
};

class VContext_TombLock:public ContextValidatorBase
{
public:
	virtual bool Validate(uint8 iPlayerID,CombatSessionImp * pContext)const ;
	void InitData(bool bOurSide,bool bLock)
	{
		m_bOurSide=bOurSide;
		m_bLock=bLock;
	}
private:
	bool  m_bOurSide;
	bool  m_bLock;
};

#endif